home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / prolog / ai.prl / opnprlg1.hqx / Open Prolog / Open Prolog.rsrc / CODE_27_startupStuff.txt < prev    next >
Text File  |  1993-04-15  |  16KB  |  283 lines

  1. # near model CODE resource
  2. # entry label at 0x0000
  3. export_407:
  4. entry:
  5. 00000000  4E56 FFEA                link       A6, -0x0016
  6. 00000004  48E7 F0C0                movem.l    -[A7], D0,D1,D2,D3,A0,A1
  7. 00000008  42AD F4FA                clr.l      [A5 - 0xB06]
  8. 0000000C  7000                     moveq.l    D0, 0x00
  9. 0000000E  3D40 FFF4                move.w     [A6 - 0xC], D0
  10. 00000012  A122                     trap       NewHandle, flags=1
  11. 00000014  3F38 0220                move.w     -[A7], [0x00000220 /* MemErr */]
  12. 00000018  6708                     beq        +0xA /* 00000022 */
  13. 0000001A  487A 030A                pea.l      [PC + 0x30A /* 00000326 */]
  14. 0000001E  4EAD 0CD2                jsr        [A5 + 0xCD2]
  15. label00000022:
  16. 00000022  548F                     addq.l     A7, 2
  17. 00000024  2D48 0008                move.l     [A6 + 0x8], A0
  18. 00000028  7008                     moveq.l    D0, 0x08
  19. 0000002A  3D40 FFF6                move.w     [A6 - 0xA], D0
  20. 0000002E  A122                     trap       NewHandle, flags=1
  21. 00000030  3F38 0220                move.w     -[A7], [0x00000220 /* MemErr */]
  22. 00000034  6708                     beq        +0xA /* 0000003E */
  23. 00000036  487A 02EE                pea.l      [PC + 0x2EE /* 00000326 */]
  24. 0000003A  4EAD 0CD2                jsr        [A5 + 0xCD2]
  25. label0000003E:
  26. 0000003E  548F                     addq.l     A7, 2
  27. 00000040  2D48 000C                move.l     [A6 + 0xC], A0
  28. 00000044  A029                     trap       HLock
  29. 00000046  3F38 0220                move.w     -[A7], [0x00000220 /* MemErr */]
  30. 0000004A  6708                     beq        +0xA /* 00000054 */
  31. 0000004C  487A 02D8                pea.l      [PC + 0x2D8 /* 00000326 */]
  32. 00000050  4EAD 0CD2                jsr        [A5 + 0xCD2]
  33. label00000054:
  34. 00000054  548F                     addq.l     A7, 2
  35. 00000056  2010                     move.l     D0, [A0]
  36. 00000058  C0AD FDA4                and.l      D0, [A5 - 0x25C]
  37. 0000005C  2240                     movea.l    A1, D0
  38. 0000005E  4299                     clr.l      [A1]+
  39. 00000060  4259                     clr.w      [A1]+
  40. 00000062  4251                     clr.w      [A1]
  41. 00000064  A02A                     trap       HUnlock
  42. 00000066  3F38 0220                move.w     -[A7], [0x00000220 /* MemErr */]
  43. 0000006A  6708                     beq        +0xA /* 00000074 */
  44. 0000006C  487A 02B8                pea.l      [PC + 0x2B8 /* 00000326 */]
  45. 00000070  4EAD 0CD2                jsr        [A5 + 0xCD2]
  46. label00000074:
  47. 00000074  548F                     addq.l     A7, 2
  48. 00000076  4FEF FFFE                lea.l      A7, [A7 - 0x2]
  49. 0000007A  2F3C 5052 4C58           move.l     -[A7], 0x50524C58 /* 'PRLX' */
  50. 00000080  A99C                     trap       CountResources
  51. 00000082  3F38 0A60                move.w     -[A7], [0x00000A60 /* ResErr */]
  52. 00000086  6708                     beq        +0xA /* 00000090 */
  53. 00000088  487A 029C                pea.l      [PC + 0x29C /* 00000326 */]
  54. 0000008C  4EAD 0CD2                jsr        [A5 + 0xCD2]
  55. label00000090:
  56. 00000090  548F                     addq.l     A7, 2
  57. 00000092  3D5F FFFE                move.w     [A6 - 0x2], [A7]+
  58. 00000096  6700 026C                beq        +0x26E /* 00000304 */
  59. 0000009A  3D7C 0001 FFFC           move.w     [A6 - 0x4], 0x1
  60. label000000A0:
  61. 000000A0  4FEF FFFC                lea.l      A7, [A7 - 0x4]
  62. 000000A4  2F3C 5052 4C58           move.l     -[A7], 0x50524C58 /* 'PRLX' */
  63. 000000AA  3F2E FFFC                move.w     -[A7], [A6 - 0x4]
  64. 000000AE  A99D                     trap       GetIndResource
  65. 000000B0  3F38 0A60                move.w     -[A7], [0x00000A60 /* ResErr */]
  66. 000000B4  6708                     beq        +0xA /* 000000BE */
  67. 000000B6  487A 026E                pea.l      [PC + 0x26E /* 00000326 */]
  68. 000000BA  4EAD 0CD2                jsr        [A5 + 0xCD2]
  69. label000000BE:
  70. 000000BE  548F                     addq.l     A7, 2
  71. 000000C0  205F                     movea.l    A0, [A7]+
  72. 000000C2  2D48 FFF8                move.l     [A6 - 0x8], A0
  73. 000000C6  A069                     trap       HGetState
  74. 000000C8  3F38 0220                move.w     -[A7], [0x00000220 /* MemErr */]
  75. 000000CC  6708                     beq        +0xA /* 000000D6 */
  76. 000000CE  487A 0256                pea.l      [PC + 0x256 /* 00000326 */]
  77. 000000D2  4EAD 0CD2                jsr        [A5 + 0xCD2]
  78. label000000D6:
  79. 000000D6  548F                     addq.l     A7, 2
  80. 000000D8  1D40 FFEB                move.b     [A6 - 0x15], D0
  81. 000000DC  A029                     trap       HLock
  82. 000000DE  3F38 0220                move.w     -[A7], [0x00000220 /* MemErr */]
  83. 000000E2  6708                     beq        +0xA /* 000000EC */
  84. 000000E4  487A 0240                pea.l      [PC + 0x240 /* 00000326 */]
  85. 000000E8  4EAD 0CD2                jsr        [A5 + 0xCD2]
  86. label000000EC:
  87. 000000EC  548F                     addq.l     A7, 2
  88. 000000EE  2010                     move.l     D0, [A0]
  89. 000000F0  C0AD FDA4                and.l      D0, [A5 - 0x25C]
  90. 000000F4  2240                     movea.l    A1, D0
  91. 000000F6  2D49 FFEE                move.l     [A6 - 0x12], A1
  92. 000000FA  41ED 0CE2                lea.l      A0, [A5 + 0xCE2]
  93. 000000FE  2B48 F4E4                move.l     [A5 - 0xB1C], A0
  94. 00000102  42AD F3CE                clr.l      [A5 - 0xC32]
  95. 00000106  3B7C 0001 F3C6           move.w     [A5 - 0xC3A], 0x1
  96. 0000010C  48ED 1CF8 F3A6           movem.l    [A5 - 0xC5A], A4,A3,A2,D7,D6,D5,D4,D3
  97. 00000112  486D F3C6                pea.l      [A5 - 0xC3A]
  98. 00000116  4E91                     jsr        [A1]
  99. 00000118  4CED 1CF8 F3A6           movem.l    A4,A3,A2,D7,D6,D5,D4,D3, [A5 - 0xC5A]
  100. 0000011E  0CAD 0000 0004 F3CE      cmpi.l     [A5 - 0xC32], 0x4
  101. 00000126  670C                     beq        +0xE /* 00000134 */
  102. 00000128  3F3C 0027                move.w     -[A7], 0x27 /* ''' */
  103. 0000012C  4EAD 04FA                jsr        [A5 + 0x4FA]
  104. 00000130  6000 01A2                bra        +0x1A4 /* 000002D4 */
  105. label00000134:
  106. 00000134  202D F3CA                move.l     D0, [A5 - 0xC36]
  107. 00000138  6700 01B8                beq        +0x1BA /* 000002F2 */
  108. 0000013C  3D40 FFF2                move.w     [A6 - 0xE], D0
  109. 00000140  3D7C 0001 FFEC           move.w     [A6 - 0x14], 0x1
  110. label00000146:
  111. 00000146  3B7C 0002 F3C6           move.w     [A5 - 0xC3A], 0x2
  112. 0000014C  3B6E FFEC F3C8           move.w     [A5 - 0xC38], [A6 - 0x14]
  113. 00000152  48ED 1CF8 F3A6           movem.l    [A5 - 0xC5A], A4,A3,A2,D7,D6,D5,D4,D3
  114. 00000158  486D F3C6                pea.l      [A5 - 0xC3A]
  115. 0000015C  226E FFEE                movea.l    A1, [A6 - 0x12]
  116. 00000160  4E91                     jsr        [A1]
  117. 00000162  4CED 1CF8 F3A6           movem.l    A4,A3,A2,D7,D6,D5,D4,D3, [A5 - 0xC5A]
  118. 00000168  7000                     moveq.l    D0, 0x00
  119. 0000016A  102D F3E4                move.b     D0, [A5 - 0xC1C]
  120. 0000016E  5080                     addq.l     D0, 8
  121. 00000170  0800 0000                btst.b     D0, 0x0
  122. 00000174  6702                     beq        +0x4 /* 00000178 */
  123. 00000176  5280                     addq.l     D0, 1
  124. label00000178:
  125. 00000178  D06E FFF6                add.w      D0, [A6 - 0xA]
  126. 0000017C  206E 000C                movea.l    A0, [A6 + 0xC]
  127. 00000180  A024                     trap       SetHandleSize
  128. 00000182  3F38 0220                move.w     -[A7], [0x00000220 /* MemErr */]
  129. 00000186  6708                     beq        +0xA /* 00000190 */
  130. 00000188  487A 019C                pea.l      [PC + 0x19C /* 00000326 */]
  131. 0000018C  4EAD 0CD2                jsr        [A5 + 0xCD2]
  132. label00000190:
  133. 00000190  548F                     addq.l     A7, 2
  134. 00000192  206E 000C                movea.l    A0, [A6 + 0xC]
  135. 00000196  A029                     trap       HLock
  136. 00000198  3F38 0220                move.w     -[A7], [0x00000220 /* MemErr */]
  137. 0000019C  6708                     beq        +0xA /* 000001A6 */
  138. 0000019E  487A 0186                pea.l      [PC + 0x186 /* 00000326 */]
  139. 000001A2  4EAD 0CD2                jsr        [A5 + 0xCD2]
  140. label000001A6:
  141. 000001A6  548F                     addq.l     A7, 2
  142. 000001A8  2010                     move.l     D0, [A0]
  143. 000001AA  C0AD FDA4                and.l      D0, [A5 - 0x25C]
  144. 000001AE  2240                     movea.l    A1, D0
  145. 000001B0  5269 0006                addq.w     [A1 + 0x6], 1
  146. 000001B4  302E FFF6                move.w     D0, [A6 - 0xA]
  147. 000001B8  43F1 0000                lea.l      A1, [A1 + D0.w]
  148. 000001BC  41ED F3E4                lea.l      A0, [A5 - 0xC1C]
  149. 000001C0  4219                     clr.b      [A1]+
  150. 000001C2  12ED F3CD                move.b     [A1]+, [A5 - 0xC33]
  151. 000001C6  7000                     moveq.l    D0, 0x00
  152. 000001C8  1018                     move.b     D0, [A0]+
  153. 000001CA  32C0                     move.w     [A1]+, D0
  154. 000001CC  5340                     subq.w     D0, 1
  155. 000001CE  6B06                     bmi        +0x8 /* 000001D6 */
  156. label000001D0:
  157. 000001D0  12D8                     move.b     [A1]+, [A0]+
  158. 000001D2  51C8 FFFC                dbf        D0, -0x6 /* 000001D0 */
  159. label000001D6:
  160. 000001D6  2009                     move.l     D0, A1
  161. 000001D8  0800 0000                btst.b     D0, 0x0
  162. 000001DC  6702                     beq        +0x4 /* 000001E0 */
  163. 000001DE  5289                     addq.l     A1, 1
  164. label000001E0:
  165. 000001E0  32FC 0001                move.w     [A1]+, 0x1
  166. 000001E4  302E FFF4                move.w     D0, [A6 - 0xC]
  167. 000001E8  0640 0032                addi.w     D0, 0x32 /* '2' */
  168. 000001EC  32C0                     move.w     [A1]+, D0
  169. 000001EE  206E 000C                movea.l    A0, [A6 + 0xC]
  170. 000001F2  93D0                     sub.l      A1, [A0]
  171. 000001F4  3D49 FFF6                move.w     [A6 - 0xA], A1
  172. 000001F8  A02A                     trap       HUnlock
  173. 000001FA  3F38 0220                move.w     -[A7], [0x00000220 /* MemErr */]
  174. 000001FE  6708                     beq        +0xA /* 00000208 */
  175. 00000200  487A 0124                pea.l      [PC + 0x124 /* 00000326 */]
  176. 00000204  4EAD 0CD2                jsr        [A5 + 0xCD2]
  177. label00000208:
  178. 00000208  548F                     addq.l     A7, 2
  179. 0000020A  202D F3CA                move.l     D0, [A5 - 0xC36]
  180. 0000020E  E588                     lsl        D0, 2
  181. 00000210  0680 0000 0018           addi.l     D0, 0x18
  182. 00000216  2400                     move.l     D2, D0
  183. 00000218  0680 0000 0032           addi.l     D0, 0x32 /* '2' */
  184. 0000021E  D06E FFF4                add.w      D0, [A6 - 0xC]
  185. 00000222  206E 0008                movea.l    A0, [A6 + 0x8]
  186. 00000226  A024                     trap       SetHandleSize
  187. 00000228  3F38 0220                move.w     -[A7], [0x00000220 /* MemErr */]
  188. 0000022C  6708                     beq        +0xA /* 00000236 */
  189. 0000022E  487A 00F6                pea.l      [PC + 0xF6 /* 00000326 */]
  190. 00000232  4EAD 0CD2                jsr        [A5 + 0xCD2]
  191. label00000236:
  192. 00000236  548F                     addq.l     A7, 2
  193. 00000238  206E 0008                movea.l    A0, [A6 + 0x8]
  194. 0000023C  A029                     trap       HLock
  195. 0000023E  3F38 0220                move.w     -[A7], [0x00000220 /* MemErr */]
  196. 00000242  6708                     beq        +0xA /* 0000024C */
  197. 00000244  487A 00E0                pea.l      [PC + 0xE0 /* 00000326 */]
  198. 00000248  4EAD 0CD2                jsr        [A5 + 0xCD2]
  199. label0000024C:
  200. 0000024C  548F                     addq.l     A7, 2
  201. 0000024E  2010                     move.l     D0, [A0]
  202. 00000250  C0AD FDA4                and.l      D0, [A5 - 0x25C]
  203. 00000254  2240                     movea.l    A1, D0
  204. 00000256  302E FFF4                move.w     D0, [A6 - 0xC]
  205. 0000025A  43F1 0030                lea.l      A1, [A1 + D0.w + 0x30]
  206. 0000025E  32C2                     move.w     [A1]+, D2
  207. 00000260  4259                     clr.w      [A1]+
  208. 00000262  202D F3CA                move.l     D0, [A5 - 0xC36]
  209. 00000266  5340                     subq.w     D0, 1
  210. 00000268  6B10                     bmi        +0x12 /* 0000027A */
  211. 0000026A  323C 0030                move.w     D1, 0x30 /* '0' */
  212. label0000026E:
  213. 0000026E  32FC 0008                move.w     [A1]+, 0x8
  214. 00000272  32C1                     move.w     [A1]+, D1
  215. 00000274  5041                     addq.w     D1, 8
  216. 00000276  51C8 FFF6                dbf        D0, -0xC /* 0000026E */
  217. label0000027A:
  218. 0000027A  32FC 0018                move.w     [A1]+, 0x18
  219. 0000027E  32FC 0002                move.w     [A1]+, 0x2
  220. 00000282  202D F3CA                move.l     D0, [A5 - 0xC36]
  221. 00000286  3340 0010                move.w     [A1 + 0x10], D0
  222. 0000028A  22AE FFF8                move.l     [A1], [A6 - 0x8]
  223. 0000028E  336E FFEC 0004           move.w     [A1 + 0x4], [A6 - 0x14]
  224. 00000294  4269 0006                clr.w      [A1 + 0x6]
  225. 00000298  236D F3CE 000C           move.l     [A1 + 0xC], [A5 - 0xC32]
  226. 0000029E  236D F4EC 0008           move.l     [A1 + 0x8], [A5 - 0xB14]
  227. 000002A4  43E9 0012                lea.l      A1, [A1 + 0x12]
  228. 000002A8  93D0                     sub.l      A1, [A0]
  229. 000002AA  3D49 FFF4                move.w     [A6 - 0xC], A1
  230. 000002AE  A02A                     trap       HUnlock
  231. 000002B0  3F38 0220                move.w     -[A7], [0x00000220 /* MemErr */]
  232. 000002B4  6708                     beq        +0xA /* 000002BE */
  233. 000002B6  487A 006E                pea.l      [PC + 0x6E /* 00000326 */]
  234. 000002BA  4EAD 0CD2                jsr        [A5 + 0xCD2]
  235. label000002BE:
  236. 000002BE  548F                     addq.l     A7, 2
  237. 000002C0  302E FFEC                move.w     D0, [A6 - 0x14]
  238. 000002C4  B06E FFF2                cmp.w      D0, [A6 - 0xE]
  239. 000002C8  670A                     beq        +0xC /* 000002D4 */
  240. 000002CA  5240                     addq.w     D0, 1
  241. 000002CC  3D40 FFEC                move.w     [A6 - 0x14], D0
  242. 000002D0  6000 FE74                bra        -0x18A /* 00000146 */
  243. label000002D4:
  244. 000002D4  082E 0007 FFEB           btst.b     [A6 - 0x15], 0x7
  245. 000002DA  6616                     bne        +0x18 /* 000002F2 */
  246. 000002DC  206E FFF8                movea.l    A0, [A6 - 0x8]
  247. 000002E0  A02A                     trap       HUnlock
  248. 000002E2  3F38 0220                move.w     -[A7], [0x00000220 /* MemErr */]
  249. 000002E6  6708                     beq        +0xA /* 000002F0 */
  250. 000002E8  487A 003C                pea.l      [PC + 0x3C /* 00000326 */]
  251. 000002EC  4EAD 0CD2                jsr        [A5 + 0xCD2]
  252. label000002F0:
  253. 000002F0  548F                     addq.l     A7, 2
  254. label000002F2:
  255. 000002F2  302E FFFC                move.w     D0, [A6 - 0x4]
  256. 000002F6  B06E FFFE                cmp.w      D0, [A6 - 0x2]
  257. 000002FA  6708                     beq        +0xA /* 00000304 */
  258. 000002FC  526E FFFC                addq.w     [A6 - 0x4], 1
  259. 00000300  6000 FD9E                bra        -0x260 /* 000000A0 */
  260. label00000304:
  261. 00000304  486D 0CE2                pea.l      [A5 + 0xCE2]
  262. 00000308  A9F1                     trap       UnloadSeg
  263. 0000030A  3F38 0220                move.w     -[A7], [0x00000220 /* MemErr */]
  264. 0000030E  6708                     beq        +0xA /* 00000318 */
  265. 00000310  487A 0014                pea.l      [PC + 0x14 /* 00000326 */]
  266. 00000314  4EAD 0CD2                jsr        [A5 + 0xCD2]
  267. label00000318:
  268. 00000318  548F                     addq.l     A7, 2
  269. 0000031A  4CDF 030F                movem.l    A1,A0,D3,D2,D1,D0, [A7]+
  270. 0000031E  4E5E                     unlink     A6
  271. 00000320  2E97                     move.l     [A7], [A7]
  272. 00000322  4FD7                     lea.l      A7, [A7]
  273. 00000324  4E75                     rts
  274. 00000326  9345                     subx.w     D1, D5
  275. 00000328  5854                     addq.w     [A4], 4
  276. 0000032A  4552                     chk.w      D2, [A2]
  277. 0000032C  4E41                     trap       1
  278. 0000032E  4C53 494E                movem.l    A6,A3,A0,D6,D3,D2,D1, [A3]
  279. 00000332  4954                     chk.w      D4, [A4]
  280. 00000334  4941                     chk.w      D4, D1
  281. 00000336  4C49 5345                movem.l    A6,A4,A1,A0,D6,D2,D0, A1
  282. 0000033A  0000                     .incomplete
  283.